var app = getApp()

Page({
  data: {
    winWidth: 0,
    winHeight: 0

  },

  onLoad: function () {
    var that = this;
    /** 
     * 获取系统信息 
     */
    wx.getSystemInfo({
      success: function (res) {
        that.setData({
          winWidth: res.windowWidth,
          winHeight: res.windowHeight
        });
      }
    });
    var Charts = require('../../utils/wxcharts-min.js');


    new Charts({
      animation: true,
      canvasId: 'ringCanvas',
      type: 'ring',
      extra: {
        ringWidth: 10,
        pie: {
          offsetAngle: -180
        }
      },
      title: {
        name: '40%',
        color: '#27E372',
        fontSize: 18
      },

      series: [{
        name: '成交量1',
        data: 40,
        stroke: false,
        color: '#27E372'
      }, {
        name: '成交量2',
        data: 60,
        stroke: false,
        color: '#F3F3F3'
      }],
      disablePieStroke: true,
      width: 120,
      height: 120,
      dataLabel: false,
      legend: false,
      padding: 0
    });
    new Charts({
      animation: true,
      canvasId: 'ringCanvasTwo',
      type: 'ring',
      extra: {
        ringWidth: 10,
        pie: {
          offsetAngle: -180
        }
      },
      title: {
        name: '80%',
        color: '#27E372',
        fontSize: 18
      },

      series: [{
        name: '成交量1',
        data: 80,
        stroke: false,
        color: '#27E372'
      }, {
        name: '成交量2',
        data: 20,
        stroke: false,
        color: '#F3F3F3'
      }],
      disablePieStroke: true,
      width: 120,
      height: 120,
      dataLabel: false,
      legend: false,
      padding: 0
    });
    new Charts({
      animation: true,
      canvasId: 'ringCanvasThree',
      type: 'ring',
      extra: {
        ringWidth: 10,
        pie: {
          offsetAngle: -180
        }
      },
      title: {
        name: '20%',
        color: '#27E372',
        fontSize: 18
      },

      series: [{
        name: '成交量1',
        data: 20,
        stroke: false,
        color: '#27E372'
      }, {
        name: '成交量2',
        data: 80,
        stroke: false,
        color: '#F3F3F3'
      }],
      disablePieStroke: true,
      width: 120,
      height: 120,
      dataLabel: false,
      legend: false,
      padding: 0
    });


  }
 

})